package com.example.crawlerjava.service.upload;

import com.example.crawlerjava.entity.UploadEntity;
import org.springframework.scheduling.annotation.Async;

import java.util.concurrent.CompletableFuture;

/**
 * 上传策略接口,主要是生成分享可以下载的链接
 */
public interface UploadStrategy {
    /**
     * 上传服务器文件给用户下载
     *
     * @param uploadFilePath 上传的文件路径
     * @return
     */
    @Async
    void upload(String uploadFilePath, String queryId);

    /**
     * 获取上传后的结果
     *
     * @param queryKey
     * @return
     */
    UploadEntity getUploadResult(String queryKey);
}
